Finalize "Multiple URL support" code. Move add_url to waypt.c. Now called 'waypt_add_...
authoroliskoli <oliskoli>
Mon, 12 Mar 2007 22:26:31 +0000 (22:26 +0000)
committeroliskoli <oliskoli>
Mon, 12 Mar 2007 22:26:31 +0000 (22:26 +0000)
util.c

diff --git a/util.c b/util.c
index 135574c6822fd40c48daa642906cc51c25bf7176..1af7d25e629c4d83ad9b1a0de8cdbab63e228adf 100644 (file)
--- a/util.c
+++ b/util.c
@@ -1641,30 +1641,3 @@ char *get_filename(const char *fname)
        
        return (res == NULL) ? (char *) fname : ++res;
 }
-
-void
-add_url(waypoint *wpt, char *link, char *url_link_text)
-{
-       /* Special case first one; it goes right into the waypoint. */
-       if ((wpt->url == NULL)  && (wpt->url_link_text == NULL)) {
-               wpt->url = link;
-               wpt->url_link_text = url_link_text;
-       } else {
-               url_link *tail;
-               url_link *new_link = xcalloc(sizeof(url_link), 1);
-               new_link->url = link;
-               new_link->url_link_text = url_link_text;
-
-               /* Find current end of chain and tack this onto the end.. */
-               for (tail = wpt->url_next;;tail = tail->url_next) {
-                       if (tail == NULL) {
-                               wpt->url_next = new_link;
-                               break;
-                       }
-                       if (tail->url_next == NULL) {
-                               tail->url_next = new_link;
-                               break;
-                       }
-               }
-       }
-}